#include <algorithm>
#include "test/Utils.h"
#include "adr/BaseModel.h"
namespace adr_test {	
	namespace Utils {
		using namespace std;		
		using namespace adr;

		void PrintModelErrors(BaseModel& model, ostream& stream) {
			if (model.IsValid()) {
				stream << "Model contains no errors.";
				return;
			}

			auto modelErrors = model.GetValidationErrors();
			for_each(
				begin(modelErrors),
				end(modelErrors),
				[&](const string& error) {
				stream << error.c_str() << endl;
			});
		}
	}
}